package com.bestom.waterquality.logic;

import android.content.Context;
import android.view.View;
import com.bestom.waterquality.R;
import com.bestom.waterquality.util.ToastUtil;

/**
 * 软件升级
 * */
public class SoftwareUpdate {

    private Context mContext;

    private SoftwareUpdate() {
    }

    private static SoftwareUpdate _instance = null;

    public static SoftwareUpdate getInstance() {
        if (_instance == null)
            _instance = new SoftwareUpdate();
        return _instance;
    }

    public void setDataAndListen(Context context, View view){

        if (mContext == null){
            mContext = context;

            view.findViewById(R.id.update);
            view.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    ToastUtil.toast("当前已是最新版本");
                }
            });
        }

    }

}
